<?php
/**
 * 云打印平台
 * @author lss
 * 2017-08-30
 */
namespace soa\mp\cloudPrint;

use soa\client;

class orderListTask  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//添加任务
	public function insert($uid,$platform,$courierId,$startDate,$endDate,$printOptions){
		return $this->post("api/cloudPrint/orderListTask/insert",compact('uid','platform','courierId','startDate','endDate','printOptions'));
	}

	//查询任务
	public function getTask($uid,$platform){
		return $this->post("api/cloudPrint/orderListTask/getTask",compact('uid','platform'));
	}

	//查询任务信息
	public function getTaskInfo($taskId){
		return $this->post("api/cloudPrint/orderListTask/getTaskInfo",compact('taskId'));
	}

	//开始任务
	public function startTask($taskId){
		return $this->post("api/cloudPrint/orderListTask/startTask",compact('taskId'));
	}

	//任务结束
	public function finishTask($taskId){
		return $this->post("api/cloudPrint/orderListTask/finishTask",compact('taskId'));
	}

	//任务失败
	public function failTask($taskId,$errMsg = "失败"){
		return $this->post("api/cloudPrint/orderListTask/failTask",compact('taskId','errMsg'));
	}
}